package pojo;

import java.time.LocalDateTime;
import java.util.Date;

public class Library {
    private Integer id;//ID
    private String name;//名字
    private Short type;//类型：0：文学类，1：自然科学类，2：教辅类，3：儿童读物
    private String description;//描述
    private Date createTime; //创建时间
    private Date updateTime; //修改时间

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Library(Integer id, String name,  Short type, String description, Date createTime, Date updateTime) {
        this.id = id;
        this.name = name;
        this.type = type;
        this.description = description;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }


    @Override
    public String toString() {
        String typeInt = null;
        switch (type){
            case 0:{
                typeInt = "文学类";break;
            }
            case 1:typeInt = "自然科学类";break;
            case 2:typeInt = "教辅类";break;
            case 3:typeInt = "儿童读物";break;
            default:typeInt = "未知分类";
        }
        return "Library{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", type=" + typeInt +
                ", description='" + description + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }

    public Library() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public Short getType() {
        return type;
    }

    public void setType(Short type) {
        this.type = type;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }


}
